<template>
  <div>
    <keep-alive :include="cachedViews">
      <router-view :key="key" />
    </keep-alive>
  </div>
</template>

<script lang="ts">
import { Vue, Component, Prop, Watch } from "vue-property-decorator";
import { LayoutStoreModule } from "@/store/modules/LayoutStore";

@Component({
  name: "LyRouterViewLayout",
  components: {},
})
export default class LyRouterViewLayout extends Vue {
  //#region vue prop =================================

  //#endregion

  //#region vue data =================================

  //#endregion
  //#region computed getter =================================
  get cachedViews() {
    return LayoutStoreModule.cachedView;
    // return this.state.cachedView
  }
  get key() {
    return this.$route.fullPath;
  }
  //#endregion
  //#region vue life =================================
  // created() {
  //   console.log("LyRouterViewlayout " + "created");
  // }
  //
  // mounted() {
  //   console.log("LyRouterViewlayout " + "mounted");
  // }
  //
  // beforeDestroy() {
  //   console.log("LyRouterViewlayout " + "beforeDestroy");
  // }

  //#endregion
  //#region comp getter =================================

  //#endregion
  //#region server data =================================

  //#endregion
  //#region components Func =================================

  //#endregion
  //#region Public Func =================================

  //#endregion
  //#region view layout =================================

  //#endregion
}
</script>
<style lang="scss"></style>
<style lang="scss" scoped></style>
